﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class UserProfile : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ProfileCommon p = Profile.GetProfile(Membership.GetUser().UserName);

            lblFirstName.Text = p.FirstName;
            lblLastName.Text = p.LastName;
            lblAge.Text = p.Age.ToString();
            lblAddress.Text = p.Address;
            lblPhoneNumber.Text = p.PhoneNumber.ToString();
            lblCreditCard.Text = "xxxx-xxxx-" + p.CreditCard.ToString().Remove(0, 8); ;
            if (p.Male)
            {
                lblGender.Text = "Male";
            }
            else
            {
                lblGender.Text = "Female";
            }
            lblMeter.Text = p.SkyMeter.ToString() + " km";

        }
    }
    
}
